package net.sunbeta.test.util ;

import java.util.Date ;

import org.joda.time.LocalDate ;

public class FeedUtils {

    public static boolean isEmpty(String value) {

        return (value == null || value.trim().length() == 0) ;
    }

    public static boolean invalid(String element) {

        return !isEmpty(element) ;
    }

    public static String getHexadecimal(long longValue) {

        return String.format("%1$4x", longValue).toUpperCase().replaceAll(" ", "0") ;
    }

    public static void main(String[] args) {
        LocalDate localDate = new LocalDate() ;
        System.out.println(localDate.toString()) ;
        System.out.println(localDate.toDateMidnight().toDate()) ;
        System.out.println(LocalDate.fromDateFields(new Date())) ;
    }

}
